/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.jfbmonitor.language;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 *
 * @author rande
 */
public class Language {

    private static Language sing;

    public Language() {
    }

    public String getProperties(String properties) {
        Properties pr = new Properties();
        InputStream is = this.getClass().getResourceAsStream("language.properties");
        String value = null;
        try {
            pr.load(is);
            value = pr.getProperty(properties);
            is.close();
        } catch (IOException ex) {
            System.out.println(ex.getMessage());
            ex.printStackTrace();
        }
        return value;
    }

    public static Language getInstance() {
        if (sing == null) {
            sing = new Language();
        }
        return sing;
    }
}
